﻿
using Wicresoft.SelfService.WFHost.Code;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Wicresoft.SelfService.WFInterface;

namespace Wicresoft.SelfService.Test
{


    /// <summary>
    ///This is a test class for ApproveFlowTest and is intended
    ///to contain all ApproveFlowTest Unit Tests
    ///</summary>
    [TestClass()]
    public class ApproveFlowTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for Create
        ///</summary>
        [TestMethod()]
        public void CreateTest1001()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = false,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };

            RequestResult expected = new RequestResult
            {
                ErrorMsg = null,
                FlowInstanceId = new Guid(),
                RequestCode = null,
                Status = "Waiting",
                Step = "event_process"
            };
            RequestResult actual = target.Create(requestParam);

            //if (actual != null && actual.FlowInstanceId != new Guid())
            //{
            //    actual.FlowInstanceId = new Guid();
            //}

            Assert.AreEqual(expected.ErrorMsg, actual.ErrorMsg);
            //Assert.AreEqual(expected.FlowInstanceId, actual.FlowInstanceId);
            Assert.AreEqual(expected.RequestCode, actual.RequestCode);
            Assert.AreEqual(expected.Status, actual.Status);
            Assert.AreEqual(expected.Step, actual.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        [TestMethod()]
        public void CreateTest1002()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0002",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };

            RequestResult expected = new RequestResult
            {
                ErrorMsg = null,
                FlowInstanceId = new Guid(),
                RequestCode = null,
                Status = "Pending",
                Step = "local_interface"
            };
            RequestResult actual = target.Create(requestParam);
            //if (actual != null && actual.FlowInstanceId != new Guid())
            //{
            //    actual.FlowInstanceId = new Guid();
            //}

            Assert.AreEqual(expected.ErrorMsg, actual.ErrorMsg);
            //Assert.AreEqual(expected.FlowInstanceId, actual.FlowInstanceId);
            Assert.AreEqual(expected.RequestCode, actual.RequestCode);
            Assert.AreEqual(expected.Status, actual.Status);
            Assert.AreEqual(expected.Step, actual.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///SecurityCode != "fjyc.wicresoft"
        ///</summary>
        [TestMethod()]
        public void CreateTest1001_101()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = false,
                RequestCode = null,
                SecurityCode = "wicresoft"
            };

            RequestResult expected = new RequestResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                FlowInstanceId = new Guid(),
                RequestCode = null,
                Status = null,
                Step = null
            };
            RequestResult actual = target.Create(requestParam);

            //if (actual != null && actual.FlowInstanceId != new Guid())
            //{
            //    actual.FlowInstanceId = new Guid();
            //}

            Assert.AreEqual(expected.ErrorMsg, actual.ErrorMsg);
            //Assert.AreEqual(expected.FlowInstanceId, actual.FlowInstanceId);
            Assert.AreEqual(expected.RequestCode, actual.RequestCode);
            Assert.AreEqual(expected.Status, actual.Status);
            Assert.AreEqual(expected.Step, actual.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }


        /// <summary>
        ///A test for Update  【NeedDirector = false ,Reject】
        ///</summary>
        [TestMethod()]
        public void UpdateTest2001()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "Reject",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = null,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Rejected",
                Step = "local_interface"
            };
            ActionResult actualAction = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }


        /// <summary>
        /// 【SecurityCode != "fjyc.wicresoft",CurrentStep=local_interface,NeedDirector = false】
        ///</summary>
        [TestMethod()]
        public void UpdateTest2001_211()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "Reject",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = null
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ,CurrentStep=local_interface, NeedDirector = false】Reject
        ///</summary>
        [TestMethod()]
        public void UpdateTest2001_212()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "Reject",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "The RequestCode of Flow <" + actionParam.FlowInstanceId + ">is Repeat.",
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Rejected",
                Step = "local_interface"
            };
            ActionResult actualAction = target.Update(actionParam);
            ActionResult actualActionRepeat = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualActionRepeat.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualActionRepeat.RequestCode);
            Assert.AreEqual(expected.Status, actualActionRepeat.Status);
            Assert.AreEqual(expected.Step, actualActionRepeat.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Update  【NeedDirector = false ,Cancel】
        ///</summary>
        [TestMethod()]
        public void UpdateTest2002()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "Cancel",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = null,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Canceled",
                Step = "local_interface"
            };
            ActionResult actualAction = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【SecurityCode != "fjyc.wicresoft",CurrentStep=local_interface, NeedDirector = false】
        ///</summary>
        [TestMethod()]
        public void UpdateTest2002_221()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "Cancel",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "adfs"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ,CurrentStep=local_interface, NeedDirector = false】Cancel
        ///</summary>
        [TestMethod()]
        public void UpdateTest2002_222()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "Cancel",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "The RequestCode of Flow <" + actionParam.FlowInstanceId + ">is Repeat.",
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Canceled",
                Step = "local_interface"
            };
            ActionResult actualAction = target.Update(actionParam);
            ActionResult actualActionRepeat = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualActionRepeat.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualActionRepeat.RequestCode);
            Assert.AreEqual(expected.Status, actualActionRepeat.Status);
            Assert.AreEqual(expected.Step, actualActionRepeat.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Update  【NeedDirector = false，Approve】 
        ///</summary>
        [TestMethod()]
        public void UpdateTest2003()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = null,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Waiting",
                Step = "event_process"
            };
            ActionResult actualAction = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【SecurityCode != "fjyc.wicresoft",CurrentStep=local_interface, NeedDirector = false】
        ///</summary>
        [TestMethod()]
        public void UpdateTest2003_231()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fsf"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【Action != "Reject|Approve|Cancel",CurrentStep=local_interface，NeedDirector = false】
        ///</summary>
        [TestMethod()]
        public void UpdateTest2003_232()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "aaaa",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper action.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ,CurrentStep=local_interface, NeedDirector = false】Approve
        ///</summary>
        public void UpdateTest2003_233()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "The RequestCode of Flow <" + actionParam.FlowInstanceId + ">is Repeat.",
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Waiting",
                Step = "event_process"
            };
            ActionResult actualAction = target.Update(actionParam);
            ActionResult actualActionRepeat = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualActionRepeat.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualActionRepeat.RequestCode);
            Assert.AreEqual(expected.Status, actualActionRepeat.Status);
            Assert.AreEqual(expected.Step, actualActionRepeat.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Update  【NeedDirector = true， Approve】
        ///</summary>
        [TestMethod()]
        public void UpdateTest2004()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = null,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Pending",
                Step = "local_director"
            };
            ActionResult actualAction = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【SecurityCode != "fjyc.wicresoft"，CurrentStep=local_director，NeedDirector = true】
        ///</summary>
        [TestMethod()]
        public void UpdateTest2004_241()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "12213"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【Action != "Reject|Approve|Cancel",CurrentStep=local_director,NeedDirector = true】 
        ///</summary>
        [TestMethod()]
        public void UpdateTest2004_242()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "aaaa",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper action.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ，CurrentStep=local_director，NeedDirector = true】Approve
        ///</summary>
        [TestMethod()]
        public void UpdateTest2004_243()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "The RequestCode of Flow <" + actionParam.FlowInstanceId + ">is Repeat.",
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Pending",
                Step = "local_director"
            };
            ActionResult actualAction = target.Update(actionParam);
            ActionResult actualActionRepeat = target.Update(actionParam);

            Assert.AreEqual(expected.ErrorMsg, actualActionRepeat.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualActionRepeat.RequestCode);
            Assert.AreEqual(expected.Status, actualActionRepeat.Status);
            Assert.AreEqual(expected.Step, actualActionRepeat.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Update  【NeedDirector = false, Reject】
        ///</summary>
        [TestMethod()]
        public void UpdateTest3001()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Reject",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult expected = new ActionResult
            {
                ErrorMsg = null,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                Status = "Rejected",
                Step = "local_director"
            };
            ActionResult actualAction = target.Update(actionParam_local_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【SecurityCode != "fjyc.wicresoft"，CurrentStep=local_director,NeedDirector = true】
        ///</summary>
        [TestMethod()]
        public void UpdateTest3001_311()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Reject",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "aaaa"
            };
            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_local_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【Action != "Reject|Approve|Cancel",CurrentStep=local_director,Reject】/重复/
        ///</summary>
        [TestMethod()]
        public void UpdateTest3001_312()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "aaaaa",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper action.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_local_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ，CurrentStep=local_director,NeedDirector = true】Reject
        ///</summary>
        [TestMethod()]
        public void UpdateTest3001_313()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Reject",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult expected = new ActionResult
            {
                ErrorMsg = "The RequestCode of Flow <" + actionParam_local_director.FlowInstanceId + ">is Repeat.",
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                Status = "Rejected",
                Step = "local_director"
            };
            ActionResult actualAction = target.Update(actionParam_local_director);
            ActionResult actualActionRepeat = target.Update(actionParam_local_director);

            Assert.AreEqual(expected.ErrorMsg, actualActionRepeat.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualActionRepeat.RequestCode);
            Assert.AreEqual(expected.Status, actualActionRepeat.Status);
            Assert.AreEqual(expected.Step, actualActionRepeat.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Update  【NeedDirector = false，Approve，NeedCrossCompany = false】
        ///</summary>
        [TestMethod()]
        public void UpdateTest3002()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = null,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                Status = "Waiting",
                Step = "event_process"
            };
            ActionResult actualAction = target.Update(actionParam_local_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【SecurityCode != "fjyc.wicresoft"，CurrentStep=local_director,NeedCrossCompany = false】
        ///</summary>
        [TestMethod()]
        public void UpdateTest3002_321()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "aaaa"
            };
            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_local_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【Action != "Reject|Approve",CurrentStep=local_director，NeedCrossCompany = false】
        ///</summary>
        [TestMethod()]
        public void UpdateTest3002_322()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "aaaaa",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper action.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_local_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ，CurrentStep=local_director,NeedCrossCompany = false】Approve
        ///</summary>
        [TestMethod()]
        public void UpdateTest3002_323()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "The RequestCode of Flow <" + actionParam_local_director.FlowInstanceId + ">is Repeat.",
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                Status = "Waiting",
                Step = "event_process"
            };
            ActionResult actualAction = target.Update(actionParam_local_director);
            ActionResult actualActionRepeat = target.Update(actionParam_local_director);

            Assert.AreEqual(expected.ErrorMsg, actualActionRepeat.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualActionRepeat.RequestCode);
            Assert.AreEqual(expected.Status, actualActionRepeat.Status);
            Assert.AreEqual(expected.Step, actualActionRepeat.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Update  【NeedDirector = true，Approve，NeedCrossCompany = true】
        ///</summary>
        [TestMethod()]
        public void UpdateTest3003()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = null,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                Status = "Pending",
                Step = "remote_interface"
            };
            ActionResult actualAction = target.Update(actionParam_local_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【SecurityCode != "fjyc.wicresoft"，CurrentStep=local_director，NeedCrossCompany = true】
        ///</summary>
        [TestMethod()]
        public void UpdateTest3003_331()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "aaaa"
            };
            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_local_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【Action != "Reject|Approve",CurrentStep=local_director，NeedCrossCompany = true】 
        ///</summary>
        [TestMethod()]
        public void UpdateTest3003_332()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "aaaaa",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper action.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_local_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ，CurrentStep=local_director，NeedCrossCompany = true】Approve
        ///</summary>
        [TestMethod()]
        public void UpdateTest3003_333()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "The RequestCode of Flow <" + actionParam_local_director.FlowInstanceId + ">is Repeat.",
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                Status = "Pending",
                Step = "remote_interface"
            };
            ActionResult actualAction = target.Update(actionParam_local_director);
            ActionResult actualActionRepeat = target.Update(actionParam_local_director);

            Assert.AreEqual(expected.ErrorMsg, actualActionRepeat.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualActionRepeat.RequestCode);
            Assert.AreEqual(expected.Status, actualActionRepeat.Status);
            Assert.AreEqual(expected.Step, actualActionRepeat.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Update  【NeedDirector = false，Reject】 
        ///</summary>
        [TestMethod()]
        public void UpdateTest4001()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Reject",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = null,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Rejected",
                Step = "remote_interface"
            };
            ActionResult actualAction = target.Update(actionParam_remote_interface);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【SecurityCode != "fjyc.wicresoft"，CurrentStep=remote_interface】
        ///</summary>
        [TestMethod()]
        public void UpdateTest4001_411()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Reject",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "aaaaa"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_remote_interface);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【Action != "Reject|Approve",CurrentStep=remote_interface,Reject】/重复/
        ///</summary>
        [TestMethod()]
        public void UpdateTest4001_412()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "aaaaa",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper action.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_remote_interface);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ，CurrentStep=remote_interface】Reject
        ///</summary>
        [TestMethod()]
        public void UpdateTest4001_413()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Reject",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "The RequestCode of Flow <" + actionParam_remote_interface.FlowInstanceId + ">is Repeat.",
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Rejected",
                Step = "remote_interface"
            };
            ActionResult actualAction = target.Update(actionParam_remote_interface);
            ActionResult actualActionRepeat = target.Update(actionParam_remote_interface);

            Assert.AreEqual(expected.ErrorMsg, actualActionRepeat.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualActionRepeat.RequestCode);
            Assert.AreEqual(expected.Status, actualActionRepeat.Status);
            Assert.AreEqual(expected.Step, actualActionRepeat.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Update  【NeedDirector = false,Approve】 
        ///</summary>
        [TestMethod()]
        public void UpdateTest4002()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = null,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Waiting",
                Step = "event_process"
            };
            ActionResult actualAction = target.Update(actionParam_remote_interface);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【SecurityCode != "fjyc.wicresoft"，CurrentStep=remote_interface,NeedDirector = false】
        ///</summary>
        [TestMethod()]
        public void UpdateTest4002_421()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "aaaaaa"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_remote_interface);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【Action != "Reject|Approve",CurrentStep=remote_interface,NeedDirector = false】
        ///</summary>
        [TestMethod()]
        public void UpdateTest4002_422()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "aaaaaa",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper action.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_remote_interface);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ，CurrentStep=remote_interface,NeedDirector = false】Approve
        ///</summary>
        [TestMethod()]
        public void UpdateTest4002_423()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = false,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "The RequestCode of Flow <" + actionParam_remote_interface.FlowInstanceId + ">is Repeat.",
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Waiting",
                Step = "event_process"
            };
            ActionResult actualAction = target.Update(actionParam_remote_interface);
            ActionResult actualActionRepeat = target.Update(actionParam_remote_interface);

            Assert.AreEqual(expected.ErrorMsg, actualActionRepeat.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualActionRepeat.RequestCode);
            Assert.AreEqual(expected.Status, actualActionRepeat.Status);
            Assert.AreEqual(expected.Step, actualActionRepeat.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Update  【NeedDirector = true,Approve】
        ///</summary>
        [TestMethod()]
        public void UpdateTest4003()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = null,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Pending",
                Step = "remote_director"
            };
            ActionResult actualAction = target.Update(actionParam_remote_interface);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【SecurityCode != "fjyc.wicresoft",CurrentStep=remote_interface，NeedDirector = true】
        ///</summary>
        [TestMethod()]
        public void UpdateTest4003_431()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "aaaaaa"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_remote_interface);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【Action != "Reject|Approve",CurrentStep=remote_interface，NeedDirector = true】 
        ///</summary>
        [TestMethod()]
        public void UpdateTest4003_432()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "aaaaaa",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper action.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_remote_interface);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ,CurrentStep=remote_interface，NeedDirector = true】Approve
        ///</summary>
        [TestMethod()]
        public void UpdateTest4003_433()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "The RequestCode of Flow <" + actionParam_remote_interface.FlowInstanceId + ">is Repeat.",
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                Status = "Pending",
                Step = "remote_director"
            };
            ActionResult actualAction = target.Update(actionParam_remote_interface);
            ActionResult actualActionRepeat = target.Update(actionParam_remote_interface);

            Assert.AreEqual(expected.ErrorMsg, actualActionRepeat.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualActionRepeat.RequestCode);
            Assert.AreEqual(expected.Status, actualActionRepeat.Status);
            Assert.AreEqual(expected.Step, actualActionRepeat.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Update  【NeedDirector = false,Reject】 
        ///</summary>
        [TestMethod()]
        public void UpdateTest5001()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_director = target.Update(actionParam_remote_interface);
            ActionParam actionParam_remote_director = new ActionParam
            {
                Action = "Reject",
                CurrentStep = actualAction_remote_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = null,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                Status = "Rejected",
                Step = "remote_director"
            };
            ActionResult actualAction = target.Update(actionParam_remote_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【SecurityCode != "fjyc.wicresoft"，CurrentStep=remote_director】
        ///</summary>
        [TestMethod()]
        public void UpdateTest5001_511()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_director = target.Update(actionParam_remote_interface);
            ActionParam actionParam_remote_director = new ActionParam
            {
                Action = "Reject",
                CurrentStep = actualAction_remote_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "aaaaza"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_remote_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【Action != "Reject|Approve",CurrentStep=remote_director，reject】 /重复/
        ///</summary>
        [TestMethod()]
        public void UpdateTest5001_512()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_director = target.Update(actionParam_remote_interface);
            ActionParam actionParam_remote_director = new ActionParam
            {
                Action = "aaaaaa",
                CurrentStep = actualAction_remote_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper action.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_remote_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ，CurrentStep=remote_director】Reject
        ///</summary>
        [TestMethod()]
        public void UpdateTest5001_513()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_director = target.Update(actionParam_remote_interface);
            ActionParam actionParam_remote_director = new ActionParam
            {
                Action = "Reject",
                CurrentStep = actualAction_remote_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "The RequestCode of Flow <" + actionParam_remote_director.FlowInstanceId + ">is Repeat.",
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                Status = "Rejected",
                Step = "remote_director"
            };
            ActionResult actualAction = target.Update(actionParam_remote_director);
            ActionResult actualActionRepeat = target.Update(actionParam_remote_director);

            Assert.AreEqual(expected.ErrorMsg, actualActionRepeat.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualActionRepeat.RequestCode);
            Assert.AreEqual(expected.Status, actualActionRepeat.Status);
            Assert.AreEqual(expected.Step, actualActionRepeat.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Update  【NeedDirector = false，Approve】
        ///</summary>
        [TestMethod()]
        public void UpdateTest5002()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_director = target.Update(actionParam_remote_interface);
            ActionParam actionParam_remote_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = null,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                Status = "Waiting",
                Step = "event_process"
            };
            ActionResult actualAction = target.Update(actionParam_remote_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【SecurityCode != "fjyc.wicresoft"，CurrentStep=remote_director】
        ///</summary>
        [TestMethod()]
        public void UpdateTest5002_521()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_director = target.Update(actionParam_remote_interface);
            ActionParam actionParam_remote_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "aaaaaa"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper SecurityCode.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_remote_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【Action != "Reject|Approve",CurrentStep=remote_director】 
        ///</summary>
        [TestMethod()]
        public void UpdateTest5002_522()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_director = target.Update(actionParam_remote_interface);
            ActionParam actionParam_remote_director = new ActionParam
            {
                Action = "aaaaaa",
                CurrentStep = actualAction_remote_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "Please enter Proper action.",
                RequestCode = null,
                Status = null,
                Step = null
            };
            ActionResult actualAction = target.Update(actionParam_remote_director);

            Assert.AreEqual(expected.ErrorMsg, actualAction.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualAction.RequestCode);
            Assert.AreEqual(expected.Status, actualAction.Status);
            Assert.AreEqual(expected.Step, actualAction.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ，CurrentStep=remote_director】Approve
        ///</summary>
        [TestMethod()]
        public void UpdateTest5002_523()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_director = target.Update(actionParam_remote_interface);
            ActionParam actionParam_remote_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            ActionResult expected = new ActionResult
            {
                ErrorMsg = "The RequestCode of Flow <" + actionParam_remote_director.FlowInstanceId + ">is Repeat.",
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                Status = "Waiting",
                Step = "event_process"
            };
            ActionResult actualAction = target.Update(actionParam_remote_director);
            ActionResult actualActionRepeat = target.Update(actionParam_remote_director);

            Assert.AreEqual(expected.ErrorMsg, actualActionRepeat.ErrorMsg);
            Assert.AreEqual(expected.RequestCode, actualActionRepeat.RequestCode);
            Assert.AreEqual(expected.Status, actualActionRepeat.Status);
            Assert.AreEqual(expected.Step, actualActionRepeat.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for RollBack  【local_director => local_interface】
        ///</summary>
        [TestMethod()]
        public void RollBack6001()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            RollBackParam rollBackParam_local_director = new RollBackParam
            {
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            RollBackResult expected = new RollBackResult
            {
                IsSuccess = true,
                actionResult = new ActionResult
                {
                    ErrorMsg = null,
                    RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                    Status = "Pending",
                    Step = "local_interface"
                }
            };
            RollBackResult rollBackResult = target.RollBack(rollBackParam_local_director);

            Assert.AreEqual(expected.IsSuccess, rollBackResult.IsSuccess);
            Assert.AreEqual(expected.actionResult.ErrorMsg, rollBackResult.actionResult.ErrorMsg);
            Assert.AreEqual(expected.actionResult.RequestCode, rollBackResult.actionResult.RequestCode);
            Assert.AreEqual(expected.actionResult.Status, rollBackResult.actionResult.Status);
            Assert.AreEqual(expected.actionResult.Step, rollBackResult.actionResult.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【SecurityCode != "fjyc.wicresoft"，CurrentStep=local_director】
        ///</summary>
        [TestMethod()]
        public void RollBack6001_611()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            RollBackParam rollBackParam_local_director = new RollBackParam
            {
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc"
            };

            RollBackResult expected = new RollBackResult
            {
                IsSuccess = false,
                actionResult = new ActionResult
                {
                    ErrorMsg = "Please enter Proper SecurityCode.",
                    RequestCode = null,
                    Status = null,
                    Step = null
                }
            };
            RollBackResult rollBackResult = target.RollBack(rollBackParam_local_director);

            Assert.AreEqual(expected.IsSuccess, rollBackResult.IsSuccess);
            Assert.AreEqual(expected.actionResult.ErrorMsg, rollBackResult.actionResult.ErrorMsg);
            Assert.AreEqual(expected.actionResult.RequestCode, rollBackResult.actionResult.RequestCode);
            Assert.AreEqual(expected.actionResult.Status, rollBackResult.actionResult.Status);
            Assert.AreEqual(expected.actionResult.Step, rollBackResult.actionResult.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for RollBack  【remote_interface => local_director】
        ///</summary>
        [TestMethod()]
        public void RollBack6002()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            RollBackParam rollBackParam_remote_interface = new RollBackParam
            {
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            RollBackResult expected = new RollBackResult
            {
                IsSuccess = true,
                actionResult = new ActionResult
                {
                    ErrorMsg = null,
                    RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                    Status = "Pending",
                    Step = "local_director"
                }
            };
            RollBackResult rollBackResult = target.RollBack(rollBackParam_remote_interface);

            Assert.AreEqual(expected.IsSuccess, rollBackResult.IsSuccess);
            Assert.AreEqual(expected.actionResult.ErrorMsg, rollBackResult.actionResult.ErrorMsg);
            Assert.AreEqual(expected.actionResult.RequestCode, rollBackResult.actionResult.RequestCode);
            Assert.AreEqual(expected.actionResult.Status, rollBackResult.actionResult.Status);
            Assert.AreEqual(expected.actionResult.Step, rollBackResult.actionResult.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }


        /// <summary>
        ///【CurrentStep = null，CurrentStep=remote_interface】
        ///</summary>
        [TestMethod()]
        public void RollBack6002_621()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            RollBackParam rollBackParam_remote_interface = new RollBackParam
            {
                //CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };

            RollBackResult expected = new RollBackResult
            {
                IsSuccess = false,
                actionResult = new ActionResult
                {
                    ErrorMsg = "Please enter CurrentStep.",
                    RequestCode = null,
                    Status = null,
                    Step = null
                }
            };
            RollBackResult rollBackResult = target.RollBack(rollBackParam_remote_interface);

            Assert.AreEqual(expected.IsSuccess, rollBackResult.IsSuccess);
            Assert.AreEqual(expected.actionResult.ErrorMsg, rollBackResult.actionResult.ErrorMsg);
            Assert.AreEqual(expected.actionResult.RequestCode, rollBackResult.actionResult.RequestCode);
            Assert.AreEqual(expected.actionResult.Status, rollBackResult.actionResult.Status);
            Assert.AreEqual(expected.actionResult.Step, rollBackResult.actionResult.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for RollBack  【remote_director => remote_interface】
        ///</summary>
        [TestMethod()]
        public void RollBack6003()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_director = target.Update(actionParam_remote_interface);
            RollBackParam rollBackParam_remote_director = new RollBackParam
            {
                CurrentStep = actualAction_remote_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            RollBackResult expected = new RollBackResult
            {
                IsSuccess = true,
                actionResult = new ActionResult
                {
                    ErrorMsg = null,
                    RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                    Status = "Pending",
                    Step = "remote_interface"
                }
            };
            RollBackResult rollBackResult = target.RollBack(rollBackParam_remote_director);

            Assert.AreEqual(expected.IsSuccess, rollBackResult.IsSuccess);
            Assert.AreEqual(expected.actionResult.ErrorMsg, rollBackResult.actionResult.ErrorMsg);
            Assert.AreEqual(expected.actionResult.RequestCode, rollBackResult.actionResult.RequestCode);
            Assert.AreEqual(expected.actionResult.Status, rollBackResult.actionResult.Status);
            Assert.AreEqual(expected.actionResult.Step, rollBackResult.actionResult.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///【RequestCode 重复 ，CurrentStep=remote_director】
        ///</summary>
        [TestMethod()]
        public void RollBack6003_631()
        {
            ApproveFlow target = new ApproveFlow();
            RequestParam requestParam = new RequestParam
            {
                ApplicationId = "Test0001",
                NeedApprove = true,
                RequestCode = null,
                SecurityCode = "fjyc.wicresoft"
            };
            RequestResult actualRequest = target.Create(requestParam);
            ActionParam actionParam_local_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = false,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualRequest_local_director = target.Update(actionParam_local_interface);
            ActionParam actionParam_local_director = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualRequest_local_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_interface = target.Update(actionParam_local_director);
            ActionParam actionParam_remote_interface = new ActionParam
            {
                Action = "Approve",
                CurrentStep = actualAction_remote_interface.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                NeedCrossCompany = true,
                NeedDirector = true,
                RequestCode = "4618d967-3ab3-4119-b6a3-a8f651126bc8",
                SecurityCode = "fjyc.wicresoft"
            };
            ActionResult actualAction_remote_director = target.Update(actionParam_remote_interface);
            RollBackParam rollBackParam_remote_director = new RollBackParam
            {
                CurrentStep = actualAction_remote_director.Step,
                FlowInstanceId = actualRequest.FlowInstanceId,
                RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                SecurityCode = "fjyc.wicresoft"
            };

            RollBackResult expected = new RollBackResult
            {
                IsSuccess = false,
                actionResult = new ActionResult
                {
                    ErrorMsg = "The RequestCode of Flow <" + rollBackParam_remote_director.FlowInstanceId + ">is Repeat.",
                    RequestCode = "5c59db73-8007-4f64-8fe5-1c0e5e79c5e7",
                    Status = "Pending",
                    Step = "remote_interface"
                }
            };
            RollBackResult rollBackResult = target.RollBack(rollBackParam_remote_director);
            RollBackResult rollBackResultRepeat = target.RollBack(rollBackParam_remote_director);

            Assert.AreEqual(expected.IsSuccess, rollBackResultRepeat.IsSuccess);
            Assert.AreEqual(expected.actionResult.ErrorMsg, rollBackResultRepeat.actionResult.ErrorMsg);
            Assert.AreEqual(expected.actionResult.RequestCode, rollBackResultRepeat.actionResult.RequestCode);
            Assert.AreEqual(expected.actionResult.Status, rollBackResultRepeat.actionResult.Status);
            Assert.AreEqual(expected.actionResult.Step, rollBackResultRepeat.actionResult.Step);

            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

    }
}

